﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using CHFramework;

public class UISettingPanel : BaseUI
{
    public GameObject CloseBtn;
    public GameObject QuitBtn;

    private void Awake()
    {
        base.CurrentUIType.PanelType = UIPanelType.Popup;
        base.CurrentUIType.ShowMode = UIPanelShowMode.Normal;

        EventTriggerListener.Get(CloseBtn).onClick = OnClose;
        EventTriggerListener.Get(QuitBtn).onClick = OnEnterQuit;
    }

    /// <summary>
    /// 关闭
    /// </summary>
    /// <param name="sender"></param>
    private void OnClose(GameObject sender)
    {
        UIManager.Instance.CloseUIPanel(EnumPanel.UISettingPanel);
    }

    /// <summary>
    /// 打开帮助
    /// </summary>
    /// <param name="sender"></param>
    private void OnEnterQuit(GameObject sender)
    {
        Application.Quit();
    }
}
